<%@page import="java.util.ArrayList"%>
<%@page import="com.situ.web.entity.Banji"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" type="text/css" href="bootstrap-3.3.7-dist/css/bootstrap.css"/>
</head>
<body>
	<%-- <form action="<%=request.getContextPath()%>/student?method=insert" method="post">
		用户名：<input type="text" name="name"/><br/>
		年龄：<input type="text" name="age"/><br/>
		性别：<input type="text" name="gender"/><br/>
		<input type="submit" value="添加"/>
	</form> --%>
	<div style="width: 600px; margin: 100px auto;">
		<form  action="<%=request.getContextPath()%>/student?method=insert" method="post">
 			<div class="form-group">
				<label>ID</label>
				<input type="text" class="form-control" name="id">
 		 	</div>
 			<div class="form-group">
				<label>姓名</label>
				<input type="text" class="form-control" name="name">
 	 		</div>
			<div class="form-group">
				<label>年龄</label>
				<input type="text" class="form-control" name="age">
 			 </div>
 			 <div class="form-group">
				<label>性别</label>
				<input type="text" class="form-control" name="gender">
 			 </div>
 			 <div class="form-group">
 			  	<label>班级</label>
 			  	<select name="banjiId" class="form-control">
 			  	<%
 			  	List<Banji> list = (ArrayList<Banji>)request.getAttribute("list");
			  		for(Banji banji : list){
				%>		<option value="<%=banji.getId()%>"><%=banji.getName()%></option>
						
						
				<%
 			  		}
 			  	%>
				</select>
			</div>
 			
 			 <button type="submit" class="btn btn-default">添加</button>
 		</form>
	</div>
</body>
</html>